import React from 'react';
import { useNavigate } from 'react-router-dom';

const Login = () => {
  const navigate = useNavigate()
  return (
    <div>
      <h1>login 组件</h1>
      <button type='button' onClick={
        () => {
          navigate('/home?id=1000', { state: { username: 'wqw' } })
        }
      }>登录</button>
    </div>
  );
}

export default Login;
